// default package
package org.akaza.openclinica.domain.datamap;
// Generated Jul 31, 2013 2:03:33 PM by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.akaza.openclinica.domain.AbstractMutableDomainObject;
import org.akaza.openclinica.domain.DataMapDomainObject;
import org.akaza.openclinica.domain.Status;
import org.akaza.openclinica.domain.user.UserAccount;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;
import org.hibernate.annotations.Type;

/**
 * StudyGroupClass generated by hbm2java
 */
@Entity
@Table(name = "study_group_class")
@GenericGenerator(name = "id-generator", strategy = "native", parameters = { @Parameter(name = "sequence", value = "study_group_class_study_group_class_id_seq") })

public class StudyGroupClass  extends DataMapDomainObject {

	private int studyGroupClassId;
	private UserAccount userAccount;
	private GroupClassTypes groupClassTypes;
	private Status status;
	private String name;
	private Integer studyId;
	private Date dateCreated;
	private Date dateUpdated;
	private Integer updateId;
	private String subjectAssignment;
	//private Set datasetStudyGroupClassMaps = new HashSet(0);
	//private Set studyGroups = new HashSet(0);
	//private Set subjectGroupMaps = new HashSet(0);

	public StudyGroupClass() {
	}

	public StudyGroupClass(int studyGroupClassId) {
		this.studyGroupClassId = studyGroupClassId;
	}

//	public StudyGroupClass(int studyGroupClassId, UserAccount userAccount,
//			GroupClassTypes groupClassTypes, Status status, String name,
//			Integer studyId, Date dateCreated, Date dateUpdated,
//			Integer updateId, String subjectAssignment,
//			Set datasetStudyGroupClassMaps, Set studyGroups,
//			Set subjectGroupMaps) {
//		this.studyGroupClassId = studyGroupClassId;
//		this.userAccount = userAccount;
//		this.groupClassTypes = groupClassTypes;
//		this.status = status;
//		this.name = name;
//		this.studyId = studyId;
//		this.dateCreated = dateCreated;
//		this.dateUpdated = dateUpdated;
//		this.updateId = updateId;
//		this.subjectAssignment = subjectAssignment;
//		this.datasetStudyGroupClassMaps = datasetStudyGroupClassMaps;
//		this.studyGroups = studyGroups;
//		this.subjectGroupMaps = subjectGroupMaps;
//	}

	@Id
	@Column(name = "study_group_class_id", unique = true, nullable = false)
	public int getStudyGroupClassId() {
		return this.studyGroupClassId;
	}

	public void setStudyGroupClassId(int studyGroupClassId) {
		this.studyGroupClassId = studyGroupClassId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "owner_id")
	public UserAccount getUserAccount() {
		return this.userAccount;
	}

	public void setUserAccount(UserAccount userAccount) {
		this.userAccount = userAccount;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "group_class_type_id")
	public GroupClassTypes getGroupClassTypes() {
		return this.groupClassTypes;
	}

	public void setGroupClassTypes(GroupClassTypes groupClassTypes) {
		this.groupClassTypes = groupClassTypes;
	}


	/* @Type(type = "status")
	@JoinColumn(name = "status_id")
	public Status getStatus() {
		return this.status;
	}

	public void setStatus(Status status) {
		this.status = status;
	}*/


	@Column(name = "name", length = 30)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "study_id")
	public Integer getStudyId() {
		return this.studyId;
	}

	public void setStudyId(Integer studyId) {
		this.studyId = studyId;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "date_created", length = 4)
	public Date getDateCreated() {
		return this.dateCreated;
	}

	public void setDateCreated(Date dateCreated) {
		this.dateCreated = dateCreated;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "date_updated", length = 4)
	public Date getDateUpdated() {
		return this.dateUpdated;
	}

	public void setDateUpdated(Date dateUpdated) {
		this.dateUpdated = dateUpdated;
	}

	@Column(name = "update_id")
	public Integer getUpdateId() {
		return this.updateId;
	}

	public void setUpdateId(Integer updateId) {
		this.updateId = updateId;
	}

	@Column(name = "subject_assignment", length = 30)
	public String getSubjectAssignment() {
		return this.subjectAssignment;
	}

	public void setSubjectAssignment(String subjectAssignment) {
		this.subjectAssignment = subjectAssignment;
	}

//	@OneToMany(fetch = FetchType.LAZY, mappedBy = "studyGroupClass")
//	public Set getDatasetStudyGroupClassMaps() {
//		return this.datasetStudyGroupClassMaps;
//	}
//
//	public void setDatasetStudyGroupClassMaps(Set datasetStudyGroupClassMaps) {
//		this.datasetStudyGroupClassMaps = datasetStudyGroupClassMaps;
//	}

//	@OneToMany(fetch = FetchType.LAZY, mappedBy = "studyGroupClass")
//	public Set getStudyGroups() {
//		return this.studyGroups;
//	}
//
//	public void setStudyGroups(Set studyGroups) {
//		this.studyGroups = studyGroups;
//	}
//
//	@OneToMany(fetch = FetchType.LAZY, mappedBy = "studyGroupClass")
//	public Set getSubjectGroupMaps() {
//		return this.subjectGroupMaps;
//	}
//
//	public void setSubjectGroupMaps(Set subjectGroupMaps) {
//		this.subjectGroupMaps = subjectGroupMaps;
//	}

}
